<?php session_start();ob_start();?>
<?php
require_once'../../classes/mysql.class.php';
    if(isset($_POST) && ($_POST['login']='login'))
    {
      $user = $_POST['user'];
      $pass = $_POST['pass'];
      $new = new dbconnect();
        if( $new->check_login($user,$pass)==1)
        {
            $_SESSION['id']=$user;
            $_SESSION['pass']=$pass;
            header('Location:../views/index.php');
        }else{
header("Location:../index.php");
        }
     }
ob_flush();
    
?>